package node.appearance;

import javax.media.j3d.Material;
import javax.vecmath.*;

public class MetalAppearanceFactory extends AppearanceFactory {

	public static final String GOLD = "Gold";
	public static final String ALUMINIUM = "Aluminium";
	public static final String COPPER = "Copper";
	public static final String METALLIC_PURPLE = "MetallicPurple";
	public static final String METALLIC_RED = "MetallicRed";
	public static final String METALLIC_PLAIN = "Metal";
	public static final String METALLIC_GREEN = "MetallicGreen";
	public static final String METALLIC_BLUE = "MetallicBlue";
	public static final String METALLIC_LIGHT_RED = "MetallicLightRed";
	
	public MetalAppearanceFactory() {
		super();

		Material material;

		// Gold
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.57f, 0.40f, 0.00f ) );
		material.setDiffuseColor ( new Color3f( 0.22f, 0.15f, 0.00f ) );
		material.setSpecularColor( new Color3f( 0.71f, 0.70f, 0.56f ) );
		material.setShininess( 0.16f );

		this.registerMaterial(GOLD, material);

		// Aluminium
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.30f, 0.30f, 0.35f ) );
		material.setDiffuseColor ( new Color3f( 0.30f, 0.30f, 0.50f ) );
		material.setSpecularColor( new Color3f( 0.70f, 0.70f, 0.80f ) );
		material.setShininess( 0.09f );
		this.registerMaterial(ALUMINIUM, material);
		
		// Copper
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.33f, 0.26f, 0.23f ) );
		material.setDiffuseColor ( new Color3f( 0.50f, 0.11f, 0.00f ) );
		material.setSpecularColor( new Color3f( 0.95f, 0.73f, 0.00f ) );
		material.setShininess( 0.93f );
		this.registerMaterial(COPPER, material);
		
		// Metallic purple
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.25f, 0.17f, 0.19f ) );
		material.setDiffuseColor ( new Color3f( 0.10f, 0.03f, 0.22f ) );
		material.setSpecularColor( new Color3f( 0.64f, 0.00f, 0.98f ) );
		material.setShininess( 0.08f );
		this.registerMaterial(METALLIC_PURPLE, material);

		// Metallic red
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.25f, 0.15f, 0.15f ) );
		material.setDiffuseColor ( new Color3f( 0.27f, 0.00f, 0.00f ) );
		material.setSpecularColor( new Color3f( 0.61f, 0.13f, 0.18f ) );
		material.setShininess( 0.12f );
		this.registerMaterial(METALLIC_RED, material);
		
		// Metallic light red
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.5f, 0.057f, 0.057f ) );
		material.setDiffuseColor ( new Color3f( 0.47f, 0.00f, 0.00f ) );
		material.setSpecularColor( new Color3f( 0.71f, 0.13f, 0.18f ) );
		material.setShininess( 0.13f );
		this.registerMaterial(METALLIC_LIGHT_RED, material);
	
		// Metallic plain 
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.22f, 0.2f, 0.2f ) );
		material.setDiffuseColor ( new Color3f( 0.270f, 0.27f, 0.27f ) );
		material.setSpecularColor( new Color3f( 0.4f, 0.4f, 0.4f ) );
		material.setShininess( 0.93f );
		this.registerMaterial(METALLIC_PLAIN, material);
	
		// Metallic green
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.1f, 0.8f, 0.1f ) );
		material.setDiffuseColor ( new Color3f( 0.270f, 0.27f, 0.27f ) );
		material.setSpecularColor( new Color3f( 0.1f, 0.8f, 0.1f ) );
		this.registerMaterial(METALLIC_GREEN, material);
		
		// Metallic green
		material = new Material();
		material.setAmbientColor ( new Color3f( 0.1f, 0.1f, 0.5f ) );
		material.setDiffuseColor ( new Color3f( 0.270f, 0.27f, 0.4f ) );
		material.setSpecularColor( new Color3f( 0.15f, 0.15f, 0.8f ) );
		material.setShininess( 0.93f );
		this.registerMaterial(METALLIC_BLUE, material);

	}
}
